package com.ruoyi.common.valid.emun;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 枚举类code校验
 */
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {EnumListChecker.class})
public @interface EnumListCheck
{

    String message() default "";

    // 作用参考@Validated和@Valid的区别
    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    /** 目标枚举类 */
    Class<?> target() default Class.class;

    /** 是否忽略空值 */
    boolean ignoreEmpty() default true;
}
